import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:getx_learn/app/routes/app_pages.dart';

class RouteAuthMiddleware extends GetMiddleware {
  @override
  RouteSettings? redirect(String? route) {
    // 加入 AuthService
    Future.delayed(Duration(seconds: 1), () => Get.snackbar("提示", "跳转到[我是中间件的登录]"));
    return RouteSettings(name: Routes.TEST_MIDDLE_WARE1);
  }
}
